#include "MiddLayer.h"
#include "delay.h"
#include <stdio.h>
#include "sys_hc32f460.h"
#include "debug_uart.h"
#include "drv_usart1.h"
#include "drv_usart2.h"
#include "drv_can.h"
#include "drv_adc.h"
#include "drv_rtc.h"
#include "timer0.h"
#include "24Cxx.h"
#include "wakeup.h"
#include "BQ769xx.h"
#include "drv_iwdt.h"
#include "systemdata.h"
#include "tm1650.h"
#include "tsdb_save_data.h"

void Bsp_Hardware_init(void){
	SCB->VTOR = 0X6000;
	CLK_XtalCmd(Disable);
	HC32F460_SYSCLK_Init();
	HC32F460_Stop_Init();
	jlink_Disable();
	iwdt_init();
	USART3_Init(115200);
	printf("%s\n",SOFT_VERSION);
	Timer0_Init();
	usart2_init(9600);
	usart4_init(getSysConfData()->zhixiangParam.serialPortBaudRate.value * 100);
	ADC1_init();
	Rtc_Config();
	AT24CXX_Init();
	wakeupInit();
	Pwc_config();
	init_onchip_flashDB();
}
